import Mock from 'mockjs'
// import data from './data.json'
// import data_nav from './data_nav.json'
// import home_data from './home_data.json'
// import shiwutuijian_data from './shiwutuijian_data.json'
// import shiwu_data from './shiwu_data.json'
// import shouye_data from './shouye_data.json'

// 返回data的接口

Mock.mock(
  '/overviewData',
  // 返回数据格式
  {
    code: 0, // 状态码
    data: {
      union: {
        memoCount: 26823,
        measureCount: 12076,
        deptCount: 89,
        chartData: {
          inner: [
            { value: 9862, name: '惩戒' },
            { value: 16961, name: '激励' }
          ],
          outer: [
            { value: 2561, name: '法人惩戒' },
            { value: 7301, name: '自然人惩戒' },
            { value: 6341, name: '法人激励' },
            { value: 10620, name: '自然人激励' }
          ]
        }
      }, // 联合奖惩
      dataExchange: {
        getIn: 124340,
        getOut: 112340,
        getInCorrect: '100%',
        getOutCorrect: '100%',
        dockedAbnormal: 83,
        dockedNormal: 6,
        chartData: [
          ['product', '归集', '输出'],
          ['1月', 12820, 8700],
          ['2月', 11760, 9540],
          ['3月', 5430, 539],
          ['4月', 8790, 8740],
          ['5月', 9750, 9740],
          ['6月', 8700, 6780],
          ['7月', 9850, 9560],
          ['8月', 8050, 8530],
          ['9月', 15640, 10930],
          ['10月', 16730, 18740],
          ['11月', 9730, 8960],
          ['12月', 6790, 6730]
        ]
      },
      total: [0, 7, 6, 0, 4, 7, 4, 6],
      rotateData: [
        { name: '法人基础数量', value: 93675 },
        { name: '自然人基础数量', value: 3985269 },
        { name: '法人信用信息', value: 86074 },
        { name: '自然人信用信息', value: 3278232 },
        { name: '法人人均数量', value: 76957 },
        { name: '自然人人均数量', value: 84539 }
      ],
      redBlackList: {
        redList: {
          signCom: 7689,
          taxpayer: 68043,
          corp: 7234954,
          volunteer: 23746
        },
        blackList: {
          performed: 643789,
          case: 17634,
          unpaid: 2873,
          lose: 6439
        }
      }, // 红黑名称
      collection: {
        lv1: 76548,
        lv2: 326743,
        resourceCount: 14578,
        deptCount: 1004,
        chartData: [
          ['product', '信息量'],
          ['基础信息', 8555],
          ['业务信息', 6754],
          ['司法信息', 3657],
          ['行政执法信息', 7643],
          ['公共事业信息', 12374],
          ['信用评级信息', 8843],
          ['其他信息', 19475],
          ['累计', 67274]
        ]
      }, // 部门数据归集统计
      report: {
        chartData: [
          ['product', '数量'],
          ['1月', 1006],
          ['2月', 1006],
          ['3月', 1007],
          ['4月', 1002],
          ['5月', 1010],
          ['6月', 1007],
          ['7月', 1008],
          ['8月', 1010],
          ['9月', 1006],
          ['10月', 1011],
          ['11月', 1006],
          ['12月', 1003]
        ]
      },
      submission: [
        { name: '人力资源部', count: 156987, percent: '97%' },
        { name: '财务部', count: 74541, percent: '88%' },
        { name: '市场营销部', count: 18787, percent: '93%' },
        { name: '研发部', count: 123245, percent: '90%' },
        { name: '生产部', count: 94393, percent: '89%' },
        { name: '采购部', count: 67563, percent: '67%' }
        // { name: "物流部", count: 56987, percent: "95%" },
        // { name: "客户服务部", count: 56987, percent: "95%" },
        // { name: "行政部", count: 56987, percent: "95%" },
        // { name: "IT部门", count: 56987, percent: "95%" },
        // { name: "品质管理部", count: 56987, percent: "95%" },
        // { name: "市场研究部", count: 56987, percent: "95%" }
      ]
    } // 数据体
  }
)

/*
Mock.mock(
  '/overviewDataExchange?2020-06-01',
  {
    code: 0, data: {
      getIn: 10,
      getOut: 10,
      getInCorrect: '0%',
      getOutCorrect: '0%',
      dockedAbnormal: 0,
      dockedNormal: 0,
      chartData: [
        ['product', '归集', '输出'],
        ['1月', 120, 95],
        ['2月', 83.1, 73.4],
        ['3月', 86.4, 65.2],
        ['4月', 72.4, 53.9],
        ['5月', 72.4, 53.9],
        ['6月', 72.4, 53.9],
        ['7月', 72.4, 53.9],
        ['8月', 72.4, 53.9],
        ['9月', 72.4, 53.9],
        ['10月', 72.4, 53.9],
        ['11月', 72.4, 53.9],
        ['12月', 72.4, 53.9]
      ]
    }
  })
*/

Mock.mock(RegExp('/overviewDataExchange' + '.*'), 'get', options => {
  const url = options.url
  const param = options.url.substring(url.indexOf('?'), url.length)
  switch (param) {
    case '?thisYear':
      return {
        code: 0,
        data: {
          getIn: 10,
          getOut: 10,
          getInCorrect: '0%',
          getOutCorrect: '0%',
          dockedAbnormal: 0,
          dockedNormal: 0,
          chartData: [
            ['product', '归集', '输出'],
            ['1月', 1282, 870],
            ['2月', 1176, 954],
            ['3月', 543, 539],
            ['4月', 879, 874],
            ['5月', 975, 974],
            ['6月', 870, 678],
            ['7月', 985, 956],
            ['8月', 805, 853],
            ['9月', 1564, 1093],
            ['10月', 1673, 1874],
            ['11月', 973, 896],
            ['12月', 679, 673]
          ]
        }
      }
    case '?thisMonth':
      return {
        code: 0,
        data: {
          getIn: 20,
          getOut: 10,
          getInCorrect: '0%',
          getOutCorrect: '0%',
          dockedAbnormal: 0,
          dockedNormal: 0,
          chartData: [
            ['product', '归集', '输出'],
            ['1月', 1282, 870],
            ['2月', 1176, 954],
            ['3月', 543, 539],
            ['4月', 879, 874],
            ['5月', 975, 974],
            ['6月', 870, 678],
            ['7月', 985, 956],
            ['8月', 805, 853],
            ['9月', 1564, 1093],
            ['10月', 1673, 1874],
            ['11月', 973, 896],
            ['12月', 679, 673]
          ]
        }
      }
    default:
      return {
        code: 0,
        data: {
          getIn: 30,
          getOut: 30,
          getInCorrect: '0%',
          getOutCorrect: '0%',
          dockedAbnormal: 0,
          dockedNormal: 0,
          chartData: [
            ['product', '归集', '输出'],
            ['1月', 1282, 870],
            ['2月', 1176, 954],
            ['3月', 543, 539],
            ['4月', 879, 874],
            ['5月', 975, 974],
            ['6月', 870, 678],
            ['7月', 985, 956],
            ['8月', 805, 853],
            ['9月', 1564, 1093],
            ['10月', 1673, 1874],
            ['11月', 973, 896],
            ['12月', 679, 673]
          ]
        }
      }
  }
})
Mock.mock(RegExp('/overviewOverviewReport' + '.*'), 'get', options => {
  const url = options.url
  const param = options.url.substring(url.indexOf('?'), url.length)
  switch (param) {
    case '?thisYear':
      return {
        code: 0,
        data: {
          chartData: [
            ['product', '数量'],
            ['1月', 900],
            ['2月', 1006],
            ['3月', 1007],
            ['4月', 1002],
            ['5月', 1010],
            ['6月', 1007],
            ['7月', 1008],
            ['8月', 1010],
            ['9月', 1006],
            ['10月', 1011],
            ['11月', 1006],
            ['12月', 1003]
          ]
        }
      }
    case '?thisMonth':
      return {
        code: 0,
        data: {
          chartData: [
            ['product', '数量'],
            ['1月', 950],
            ['2月', 1006],
            ['3月', 1007],
            ['4月', 1002],
            ['5月', 1010],
            ['6月', 1007],
            ['7月', 1008],
            ['8月', 1010],
            ['9月', 1006],
            ['10月', 1011],
            ['11月', 1006],
            ['12月', 1003]
          ]
        }
      }
    default:
      return {
        code: 0,
        data: {
          chartData: [
            ['product', '数量'],
            ['1月', 1006],
            ['2月', 1006],
            ['3月', 1007],
            ['4月', 1002],
            ['5月', 1010],
            ['6月', 1007],
            ['7月', 1008],
            ['8月', 1010],
            ['9月', 1006],
            ['10月', 1011],
            ['11月', 1006],
            ['12月', 1003]
          ]
        }
      }
  }
})
Mock.mock('/summaryData', {
  code: 0,
  data: {
    monthAnalysis: {
      collection: 124340,
      appear: 128962,
      reflux: 7856
    }, // 本月数据分析
    classifyStatistic: {
      lv1: 76548,
      lv2: 326743,
      resourceCount: 14578,
      deptCount: 1004,
      chartData: [
        ['product', '信息量'],
        ['基础信息', 8555],
        ['业务信息', 6754],
        ['司法信息', 3657],
        ['行政执法信息', 7643],
        ['公共事业信息', 12374],
        ['信用评级信息', 8843],
        ['其他信息', 19475],
        ['累计', 67274]
      ],
      deptList: [
        { name: '人力部', count: 63467, percent: 15 },
        { name: '财务部', count: 33478, percent: 8 },
        { name: '市场部', count: 74866, percent: 18 },
        { name: '研发部', count: 98349, percent: 23 },
        { name: '生产部', count: 73663, percent: 17 },
        { name: '采购部', count: 25637, percent: 6 },
        { name: '物流部', count: 43485, percent: 10 }
      ]
    }, // 分类统计
    summaryCounts: {
      resource: 193745,
      collection: 7124340,
      month: 34816,
      naturalPerson: 473275,
      legalPerson: 226768,
      focusPerson: 23784,
      passPercent: 67,
      chartList: [
        ['product', '自然人', '法人及其他组织'],
        ['1月', 689543, 237473],
        ['2月', 387433, 123743],
        ['3月', 475494, 274738],
        ['4月', 478594, 347889],
        ['5月', 345250, 327843],
        ['6月', 438545, 239439],
        ['7月', 312844, 237843],
        ['8月', 765865, 343455],
        ['9月', 594604, 454596],
        ['10月', 555954, 343895],
        ['11月', 394504, 128934],
        ['12月', 439540, 149304]
      ]
    }, // 中心数据
    source: [
      ['product', '数据来源'],
      ['手工填报', 12549834],
      ['et对接', 21457865],
      ['内部接口', 23343934],
      ['其他', 20457865]
    ], // 来源
    naturalPersonAnalysis: [
      {
        outer: [
          { value: 6754, name: '业务信息' },
          { value: 4595, name: '司法信息' },
          { value: 3432, name: '行政执法信息' },
          { value: 3556, name: '信用评价信息' },
          { value: 9456, name: '公共事业信息' },
          { value: 8718, name: '其他信息' },
          { value: 4348, name: '基本信息' }
        ],
        inner: [{ value: 535, name: '直接访问' }]
      },
      {
        outer: [
          { value: 3645, name: '业务信息' },
          { value: 4556, name: '司法信息' },
          { value: 5892, name: '行政执法信息' },
          { value: 3945, name: '信用评价信息' },
          { value: 2392, name: '公共事业信息' },
          { value: 6075, name: '其他信息' },
          { value: 1354, name: '基本信息' }
        ],
        inner: [{ value: 635, name: '直接访问' }]
      }
    ],
    /* [
        ['product','分类'],
        ['基本信息',2365466],
        ['业务信息',5466],
        ['司法信息',5638],
        ['行政执法信息',3256],
        ['信用评价信息',3256],
        ['公共事业信息',5456],
        ['其他信息',5456]
      ], */
    // 自然人资源数据分类数据分析
    newestFillInDept: [
      { name: '研发部', count: 384545, percent: 10 },
      { name: '国际市场部', count: 320193, percent: 10 },
      { name: '生产部', count: 286478, percent: 10 },
      { name: '市场部', count: 275643, percent: 10 },
      { name: '财务部', count: 252837, percent: 10 }
    ] // 最新填报部门
  }
})
Mock.mock('/publicData', 'get', {
  code: 0,
  data: {
    newClassifyList: [
      { name: '研发部', count: 344543, percent: 0 },
      { name: '国际市场部', count: 124345, percent: 0 },
      { name: '生产测试部', count: 87856, percent: 0 },
      { name: '自动化测试部', count: 24544, percent: 0 },
      { name: '国安研发部', count: 23234, percent: 0 },
      { name: '社保部', count: 878563, percent: 0 },
      { name: '社会资源部', count: 45465, percent: 0 },
      { name: '产品部', count: 23954, percent: 0 },
      { name: '人力资源部', count: 42505, percent: 0 },
      { name: '财务部', count: 43545, percent: 0 }
    ],
    weekSubmit: [
      ['product', '提报率'],
      ['1天', 1540],
      ['2天', 1650],
      ['3天', 2768],
      ['4天', 1355],
      ['5天', 1235],
      ['6天', 1550],
      ['7天', 2670]
    ],
    gather: [
      ['product', '行政许可', '行政处罚'],
      ['1月', 1060, 784],
      ['2月', 1465, 630],
      ['3月', 2056, 705],
      ['4月', 1506, 503],
      ['5月', 1205, 424],
      ['6月', 1354, 501],
      ['7月', 1434, 636],
      ['8月', 2023, 454],
      ['9月', 2256, 312],
      ['10月', 1642, 554],
      ['11月', 1734, 657],
      ['12月', 1498, 445]
    ], // 双公示采集情况
    publicCounts: {
      naturalPersonPermit: 82743,
      legalPersonPermit: 38745,
      naturalPersonPunish: 19345,
      legalPersonPunish: 4566
    },
    weekCase: {
      permit: 121488,
      punish: 23911
    },
    punishRepair: [
      ['product', '数量'],
      ['1月', 4345],
      ['2月', 6567],
      ['3月', 6061],
      ['4月', 4546],
      ['5月', 1124],
      ['6月', 2544],
      ['7月', 4867],
      ['8月', 3243],
      ['9月', 5348],
      ['10月', 7578],
      ['11月', 4348],
      ['12月', 5489]
    ],
    permitDistribute: {
      outer: [
        { value: 3435, name: '业务信息' },
        { value: 6310, name: '司法信息' },
        { value: 2434, name: '行政执法信息' },
        { value: 4235, name: '信用评价信息' },
        { value: 2148, name: '公共事业信息' },
        { value: 6448, name: '其他信息' },
        { value: 7848, name: '基本信息' }
      ],
      inner: [{ value: 2335, name: '直接访问' }]
    }
  }
})
Mock.mock('/unionData', 'get', {
  code: 0,
  data: {
    unionRewardPunish: {
      total: 64753,
      memo: 43420,
      dept: 39,
      naturalPerson: {
        total: 53434,
        reward: 34549,
        punish: 18885
      },
      legalPerson: {
        total: 11319,
        reward: 6620,
        punish: 4699
      }
    },
    redBlackStatistics: {
      red: {
        total: 7334442,
        approve: 7689,
        taxpayer: 68043,
        honor: 7234954,
        excellent: 23746
      },
      black: {
        total: 670735,
        approve: 643789,
        taxpayer: 17643,
        honor: 2873,
        excellent: 6439
      }
    },
    trend: [
      ['product', '惩戒', '激励'],
      ['1月', 1000, 500],
      ['2月', 1400, 600],
      ['3月', 2000, 700],
      ['4月', 1500, 500],
      ['5月', 1200, 400],
      ['6月', 1300, 500],
      ['7月', 1400, 600],
      ['8月', 2000, 500],
      ['9月', 2200, 300],
      ['10月', 1600, 500],
      ['11月', 1700, 600],
      ['12月', 1400, 400]
    ],
    query: [
      ['product', '次数'],
      ['研发部', 764554],
      ['国际市场部', 456902],
      ['市场部', 805456],
      ['财务部', 704345],
      ['社会资源部', 604343],
      ['人力资源部', 524546],
      ['产品部', 443544],
      ['自动化测试部', 323433]
    ],
    feedback: [
      ['product', '次数'],
      ['研发部', 65656],
      ['国际市场部', 56634],
      ['市场部', 80035],
      ['财务部', 73067],
      ['社会资源部', 60530],
      ['人力资源部', 50435],
      ['产品部', 43454],
      ['自动化测试部', 30324]
    ],
    memoTrend: [
      ['product', '趋势'],
      ['10:00', 35],
      ['10:30', 50],
      ['11:00', 52],
      ['11:30', 55],
      ['12:00', 60],
      ['12:30', 56],
      ['13:00', 50],
      ['13:30', 51],
      ['14:00', 54],
      ['14:30', 57],
      ['15:00', 60],
      ['15:30', 70]
    ],
    memoStatusList: [
      { name: '房产交易', count: 8848, time: 9527 },
      { name: '规划设计方案', count: 8848, time: 9527 },
      { name: '股票交易', count: 8848, time: 9527 },
      { name: '不动产转移', count: 8848, time: 9527 }
    ],
    punishRewardList: [
      {
        name: '黄原寅',
        info: '产权交易',
        dept: '广电总局',
        time: '2023-05-02'
      },
      {
        name: '周星星',
        info: '产权交易',
        dept: '广电总局',
        time: '2023-05-02'
      },
      { name: '王茜', info: '产权交易', dept: '广电总局', time: '2023-05-02' },
      {
        name: '周一围',
        info: '产权交易',
        dept: '广电总局',
        time: '2023-05-02'
      },
      {
        name: '马晓飞',
        info: '产权交易',
        dept: '广电总局',
        time: '2023-05-02'
      },
      {
        name: '钱江',
        info: '产权交易',
        dept: '广电总局',
        time: '2023-05-02'
      },
      {
        name: '王艳艳',
        info: '产权交易',
        dept: '广电总局',
        time: '2023-05-02'
      },
      { name: '于其', info: '产权交易', dept: '广电总局', time: '2023-05-02' },
      {
        name: '解小艳',
        info: '产权交易',
        dept: '广电总局',
        time: '2023-05-02'
      },
      { name: '周海媚', info: '产权交易', dept: '广电总局', time: '2023-05-02' }
    ],
    measure: [
      ['product', '措施数量'],
      ['信用评分措施', 80487],
      ['信用记录措施', 75465],
      ['信用报告措施', 63435],
      ['信用检查措施', 53545],
      ['信用监测', 43465],
      ['信用数据安全保护', 35234],
      ['信用信息共享', 32345],
      ['信用风险管理', 31768]
    ],
    quitTrend: [
      ['product', '数量'],
      ['1月', 1000],
      ['3月', 2000],
      ['4月', 1500],
      ['5月', 1200],
      ['6月', 1300],
      ['7月', 1400],
      ['8月', 2000]
    ]
  }
})
Mock.mock('/mapData', 'get', {
  code: 0,
  data: {
    month: {
      collection: 987614,
      submit: 39547,
      reflux: 45768
    },
    classify: {
      lv1: 2345,
      lv2: 45765,
      resourceCount: 193745,
      deptCount: 23,
      chartData: [
        ['product', '数量'],
        ['基础信息', 100],
        ['业务信息', 100],
        ['司法信息', 200],
        ['行政执法信息', 300],
        ['公共事业信息', 400],
        ['信用评级信息', 500],
        ['其他信息', 600],
        ['累计', 700]
      ]
    },
    classifyList: [
      { name: '人力部', count: 63467, percent: 15 },
      { name: '财务部', count: 33478, percent: 8 },
      { name: '市场部', count: 74866, percent: 18 },
      { name: '研发部', count: 98349, percent: 23 },
      { name: '生产部', count: 73663, percent: 17 },
      { name: '采购部', count: 25637, percent: 6 },
      { name: '物流部', count: 43485, percent: 10 }
    ],
    resource: {
      resourceCount: 193745,
      dataCount: 7124340,
      monthCount: 987364
    },
    mapData: [
      [
        {
          name: '黑龙江',
          value: 76594
        }
      ],
      [
        {
          name: '北京市',
          value: 2586576
        }
      ],
      [
        {
          name: '内蒙古',
          value: 14556
        }
      ],
      [
        {
          name: '吉林',
          value: 14656
        }
      ],
      [
        {
          name: '辽宁',
          value: 47834
        }
      ],
      [
        {
          name: '河北',
          value: 102375
        }
      ],
      [
        {
          name: '天津',
          value: 34894
        }
      ],
      [
        {
          name: '山西',
          value: 38946
        }
      ],
      [
        {
          name: '陕西',
          value: 4545
        }
      ],
      [
        {
          name: '甘肃',
          value: 45655
        }
      ],
      [
        {
          name: '宁夏',
          value: 34546
        }
      ],
      [
        {
          name: '青海',
          value: 23434
        }
      ],
      [
        {
          name: '新疆',
          value: 9867
        }
      ],
      [
        {
          name: '西藏',
          value: 1343
        }
      ],
      [
        {
          name: '四川',
          value: 23345
        }
      ],
      [
        {
          name: '重庆',
          value: 7465
        }
      ],
      [
        {
          name: '山东',
          value: 64355
        }
      ],
      [
        {
          name: '河南',
          value: 15656
        }
      ],
      [
        {
          name: '江苏',
          value: 234544
        }
      ],
      [
        {
          name: '安徽',
          value: 109856
        }
      ],
      [
        {
          name: '湖北',
          value: 173453
        }
      ],
      [
        {
          name: '浙江',
          value: 245466
        }
      ],
      [
        {
          name: '福建',
          value: 128435
        }
      ],
      [
        {
          name: '江西',
          value: 98656
        }
      ],
      [
        {
          name: '湖南',
          value: 158546
        }
      ],
      [
        {
          name: '贵州',
          value: 8675
        }
      ],
      [
        {
          name: '广西',
          value: 3454
        }
      ],
      [
        {
          name: '海南',
          value: 28496
        }
      ],
      [
        {
          name: '上海',
          value: 35456
        }
      ],
      [
        {
          name: '云南',
          value: 15465
        }
      ]
    ],
    sourceData: [
      { value: 12549834, name: '手工填报' },
      { value: 21457865, name: 'et对接' },
      { value: 23343934, name: '内部接口' },
      { value: 20457865, name: '其他' }
    ],
    naturalPersonData: {
      legalPerson: {
        inner: [
          { value: 6754, name: '业务信息' },
          { value: 4595, name: '司法信息' },
          { value: 3432, name: '行政执法信息' },
          { value: 3556, name: '信用评价信息' },
          { value: 9456, name: '公共事业信息' },
          { value: 8718, name: '其他信息' },
          { value: 4348, name: '基本信息' }
        ],
        outer: [{ value: 535, name: '直接访问' }]
      },
      naturalPerson: {
        inner: [
          { value: 3645, name: '业务信息' },
          { value: 4556, name: '司法信息' },
          { value: 5892, name: '行政执法信息' },
          { value: 3945, name: '信用评价信息' },
          { value: 2392, name: '公共事业信息' },
          { value: 6075, name: '其他信息' },
          { value: 1354, name: '基本信息' }
        ],
        outer: [{ value: 635, name: '直接访问' }]
      }
    },
    newestList: [
      { name: '研发部', count: 384545, percent: 10 },
      { name: '国际市场部', count: 320193, percent: 10 },
      { name: '生产部', count: 286478, percent: 10 },
      { name: '市场部', count: 275643, percent: 10 },
      { name: '财务部', count: 252837, percent: 10 }
    ]
  }
})
